using net_work.Common.Request;
using net_work.Common.Result;
using net_work.Data.DTO.Appr;
using net_work.Data.Entity.Appr;
using net_work.Data.VO.Appr;

namespace net_work.IService.Appr;

public interface IFlowNodeService
{
    /// <summary>
    /// 分页查询流程节点
    /// </summary>
    /// <param name="request">查询参数</param>
    /// <returns>分页结果</returns>
    Task<PagedResult<FlowNodeResult>> GetFlowNodesPagedAsync(PagedRequest request);

    /// <summary>
    /// 根据流程节点ID查询流程节点信息
    /// </summary>
    /// <param name="flowNodeId">流程节点ID</param>
    /// <returns>流程节点信息</returns>
    Task<FlowNode?> SelectByIdAsync(long flowNodeId);

    /// <summary>
    /// 插入流程节点
    /// </summary>
    /// <param name="flowNodeAddRequest">新增流程节点实体</param>
    /// <returns>新增的流程节点ID</returns>
    Task<long> InsertFlowNode(FlowNodeAddRequest flowNodeAddRequest);

    /// <summary>
    /// 更新流程节点信息
    /// </summary>
    /// <param name="flowNodeUpdateRequest">更新流程节点信息</param>
    /// <returns>是否成功</returns>
    Task<int> UpdateFlowNode(FlowNodeUpdateRequest flowNodeUpdateRequest);

    /// <summary>
    /// 删除流程节点
    /// </summary>
    /// <param name="ids">流程节点ID集合</param>
    /// <returns>是否成功</returns>
    Task<int> DeleteFlowNodeByIds(List<long> ids);
}